project(configedit)
cmake_minimum_required(VERSION 2.6)
find_package(Qt4 REQUIRED)

include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})

set(configedit_SOURCES main.cpp configedit.cpp ${CMAKE_SOURCE_DIR}/lib/config.c)
set(configedit_HEADERS configedit.h)
set(configedit_FORMS ui/mainwindow.ui)

# qt4_automoc(${configedit_SRCS})
qt4_wrap_ui(configedit_FORMS_HEADERS ${configedit_FORMS})
qt4_wrap_cpp(configedit_HEADERS_MOC ${configedit_HEADERS})

add_executable(configedit ${configedit_SOURCES} ${configedit_HEADERS_MOC} ${configedit_FORMS_HEADERS})
target_link_libraries(configedit ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})

install(TARGETS configedit
RUNTIME
DESTINATION bin
)